function AjaxRequest(formID, cgiscript){
	var xhr = new XMLHttpRequest();
	var retVal = {};
	var x = "";
	for (i = 0; i < document.forms[formID].length; i++){
		if (i == 0){
			x = document.forms[formID][i].name + "=" + escape(document.forms[formID][i].value);
		}else{
			x = x + "&" + document.forms[formID][i].name + "=" + escape(document.forms[formID][i].value);
		}
	}
	xhr.onreadystatechange=function(){
		if(xhr.readyState==4 && xhr.status==200){
			retVal = JSON.parse(xhr.responseText);
		}
	};
	xhr.open("POST", cgiscript, false);
	xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xhr.send(x);
	return retVal;
};

function Clock(){
	var dObj = new Date();
	var h = dObj.getHours();
	var m = dObj.getMinutes();
	var Y = dObj.getFullYear();
	var M = dObj.getMonth();
	var D = dObj.getDate();
	var am_pm = "PM";
	if (h < 12){
		am_pm = "AM";
	};
	if (h > 12){
		h = h - 12;
	};
	if (h == 0){
		h = 12;
	};
	if (m <= 9){
		m = "0" + m;
	};
	M = M + 1;
	date_str = M + "/" + D + "/" + Y;
	time_str = h + ":" + m + " " + am_pm;
	document.getElementById("time").innerHTML = time_str;
	document.getElementById("date").innerHTML = date_str;
	setTimeout("Clock()", 10000);
};
		
function goTo(u){
	window.open(u);
};

